home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / SESSION.H < prev    next >
C/C++ Source or Header  |  1990-01-13  |  945b  |  37 lines

  1. extern int mode;
  2. #define CMD_MODE    1    /* Command mode */
  3. #define CONV_MODE    2    /* Converse mode */
  4.  
  5. /* Session control structure; only one entry is used at a time */
  6. struct session {
  7.     int type;
  8. #define FREE    0
  9. #define TELNET    1
  10. #define FTP    2
  11. #define AX25TNC 3
  12. #define FINGER    4
  13. #define NRSESS    5
  14. #define POP    6
  15.     char *name;    /* Name of remote host */
  16.     union {
  17.         struct ftp *ftp;
  18.         struct telnet *telnet;
  19.         struct ax25_cb *ax25_cb;
  20.         struct finger *finger;
  21.         struct pop_ccb *pop;
  22.     } cb;
  23.     int (*parse)();        /* Where to hand typed input when conversing */
  24.     FILE *record;        /* Receive record file */
  25.     char *rfile;        /* Record file name */
  26.     FILE *upload;        /* Send file */
  27.     char *ufile;        /* Upload file name */
  28.     struct win *win;    /* Window */
  29. };
  30. #define NULLSESSION    (struct session *)0
  31. extern unsigned nsessions;
  32. extern struct session *sessions;
  33. extern struct session *current;
  34. struct session *newsession();
  35.  
  36. extern int16 lport;
  37.